/**
 * Copyright (c) 2009-2011, chunquedong(YangJiandong)
 * 
 * This file is part of ChunMap project
 * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE(Version >=3)
 * 
 * History:
 *     2010-05-05  Jed Young  Creation
 */
package chunmap.data.feature;

import chunmap.data.provider.DataSource;
import chunmap.model.elem.Envelope;

/**
 * @author chunquedong
 * 
 */
public interface FeatureCollection {

	public void insert(Feature f);
	public boolean remove(Feature f);

    /// <summary>
    /// 返回false短路
    /// </summary>
    /// <param name="envelope"></param>
    /// <param name="filter"></param>
	public void search(Envelope envelope, VisitFunc filter);
	public void select(Envelope envelope, VisitAction filter);
    /// <summary>
    /// 返回false短路
    /// </summary>
    /// <param name="filter"></param>
	public void find(VisitFunc filter);
	public void each(VisitAction filter);

    //------------------------------------------------------------------------

	public Envelope getEnvelope();
	public void setEnvelope(Envelope envelope);
	
	public DataSource getDataResources();
	public void setDataResources(DataSource dataResources);
	
	public LayerMetadata getMetadata();
	public void setMetadata(LayerMetadata metadata);
	
	public FeatureSchama getFeatureSchama();
	public void setFeatureSchama(FeatureSchama featureSchama);
    /// <summary>
    /// 重新计算边界
    /// </summary>
	public void reComputeEnvelope();

}